home *** CD-ROM | disk | FTP | other *** search
/ Game.EXE 2001 January / execd1200.iso / Shareware / Blocks 3 / setup.exe / Source / SOUND.C < prev    next >
Encoding:
C/C++ Source or Header  |  2000-09-29  |  331 b   |  26 lines

  1. #include <allegro.h>
  2. #include <jgmod.h>
  3. #include <blocks3.h>
  4.  
  5. void Add_Sound(int x, int s)
  6. {
  7.  fx[fx_count].x = x*255/32;
  8.  fx[fx_count].s = s;
  9.  
  10.  fx_count++;
  11. }
  12.  
  13. void Play_Sound(void)
  14. {
  15.  int i;
  16.  
  17.  for (i = 0; i < fx_count; i++)
  18.  {
  19.   play_sample(sfx[fx[i].s].dat, 255, fx[i].x, 1000, 0);
  20.  }
  21.  
  22.  fx_count = 0;
  23. }
  24.  
  25.  
  26.